#ifndef PAGESWITCHBUTTON_H
#define PAGESWITCHBUTTON_H

#include <QPushButton>
#include <QWidget>
#include <QLabel>
#include <QMouseEvent>

class PageSwitchButton : public QPushButton
{
    Q_OBJECT
public:
    explicit PageSwitchButton(QWidget* parent = nullptr);

    void setImageAndText(const QString& imagePath, const QString& text, int pageId);

    void setTextColor(const QString& textColor);

    void setImage(const QString& imagePath);

    int getPageId() const;

private:
    void mousePressEvent(QMouseEvent* event);

signals:
    void switchPage(int pageId);

private:
    QLabel* btnImage = nullptr;
    QLabel* btnTittle = nullptr;

    int pageId = -1;
};

#endif // PAGESWITCHBUTTON_H
